package com.ruoyi.project.keshi.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.keshi.domain.SysCheckfee;
import com.ruoyi.project.keshi.mapper.SysCheckfeeMapper;
import com.ruoyi.project.keshi.service.ISysCheckfeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 检查费用Service业务层处理
 *
 * @author ruoyi
 * @date 2021-09-12
 */
@Service
public class SysCheckfeeServiceImpl implements ISysCheckfeeService
{
    @Autowired
    private SysCheckfeeMapper sysCheckfeeMapper;

    /**
     * 查询检查费用
     *
     * @param feeId 检查费用ID
     * @return 检查费用
     */
    @Override
    public SysCheckfee selectSysCheckfeeById(Long feeId)
    {
        return sysCheckfeeMapper.selectSysCheckfeeById(feeId);
    }

    /**
     * 查询检查费用列表
     *
     * @param sysCheckfee 检查费用
     * @return 检查费用
     */
    @Override
    public List<SysCheckfee> selectSysCheckfeeList(SysCheckfee sysCheckfee)
    {
        return sysCheckfeeMapper.selectSysCheckfeeList(sysCheckfee);
    }

    /**
     * 新增检查费用
     *
     * @param sysCheckfee 检查费用
     * @return 结果
     */
    @Override
    public int insertSysCheckfee(SysCheckfee sysCheckfee)
    {
        sysCheckfee.setCreateTime(DateUtils.getNowDate());
        return sysCheckfeeMapper.insertSysCheckfee(sysCheckfee);
    }

    /**
     * 修改检查费用
     *
     * @param sysCheckfee 检查费用
     * @return 结果
     */
    @Override
    public int updateSysCheckfee(SysCheckfee sysCheckfee)
    {
        sysCheckfee.setUpdateTime(DateUtils.getNowDate());
        return sysCheckfeeMapper.updateSysCheckfee(sysCheckfee);
    }

    /**
     * 批量删除检查费用
     *
     * @param feeIds 需要删除的检查费用ID
     * @return 结果
     */
    @Override
    public int deleteSysCheckfeeByIds(Long[] feeIds)
    {
        return sysCheckfeeMapper.deleteSysCheckfeeByIds(feeIds);
    }

    /**
     * 删除检查费用信息
     *
     * @param feeId 检查费用ID
     * @return 结果
     */
    @Override
    public int deleteSysCheckfeeById(Long feeId)
    {
        return sysCheckfeeMapper.deleteSysCheckfeeById(feeId);
    }
}
